package com.erp.order.purchasing.model;

import com.erp.hr.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.List;

@Data
@Entity
@DynamicInsert()
@DynamicUpdate()
@EqualsAndHashCode(callSuper = true)
@Table(name="quoted_price", schema="erp")
public class QuotedPrice extends BaseModel {
    private static final long serialVersionUID = 1L;

    /**
     * 供应商id
     */
    @Column(name = "vendor_id")
    private String vendorId;

    /**
     * 询价单id
     */
    @Column(name = "inquiry_list_id")
    private String inquiryListId;
    /**
     * 总计
     */
    @Column(name = "total")
    private BigDecimal total;

    /**
     * 运费
     */
    @Column(name = "freight")
    private BigDecimal freight;
    /**
     * 交易方式
     */
    @Column(name = "trade_type")
    private String tradeType;

    /**
     * 是否指定
     */
    @Column(name = "is_appoint")
    private String isAppoint;

    /**
     * 指定类型
     */
    @Column(name = "appoint_type")
    private String appointType;

    /**
     * 分阶段支付类型
     */
    @Column(name = "stage_type")
    private String stageType;

    /**
     * 支付类型
     */
    @Column(name = "pay_way")
    private String payWay;

    /**
     * 发票要求
     */
    @Column(name = "bill_type")
    private String billType;

    /**
     * 备货周期
     */
    @Column(name = "prepare_days")
    private String prepareDays;
    /**
     * 备货周期
     */
    @Column(name = "status")
    private String status;
    /**
     * 预计交货日期
     */
    @Column(name = "delivery_date")
    private String deliveryDate;

    /**
     * 备注说明
     */
    @Column(name = "remark")
    private String remark;
    /**
     * 文件
     */
    @Column(name = "files")
    private String files;

    /**
     * 物资报价详情集合
     */
    @Transient
    private List<QuotedPriceDetail> quotedPriceDetail;

    @Transient
    private String type;
}
